<include file="Public:head"/>
<link rel="stylesheet" href="{weixin::STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{weixin::STATICS}/kindeditor/plugins/code/prettify.css" />
<script src="{weixin::STATICS}/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="{weixin::STATICS}/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="{weixin::STATICS}/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<div class="content" style="width:920px; background:none; margin-left:275px; border:none; margin-bottom:30px;" >
    <div class="cLineB">
        <h4>微商城模板管理 <span class="FAQ">选择适合您的模版风格，手机输入"商城"测试效果。</span></h4>
       <!-- <a href="{weixin::U('User/Shopyulan/index',array('token'=>$_SESSION['token']))}" target="ddd" class="right btnGrayS vm" style="margin-top:-27px">微商城预览</a>-->
    </div>
    <div class="msgWrap form">
        <ul id="tags">
            <li class="selectTag"><a onclick="selectTag('tagContent0',this)" href="javascript:void(0)">1. 微商城首页模板风格</a> </li>
            <li><a onclick="selectTag('tagContent1',this)" href="javascript:void(0)">2.全部分类模板风格</a> </li>
            <li><a onclick="selectTag('tagContent2',this)" href="javascript:void(0)">3.分类商品模板风格</a> </li>
            <div class="clr"></div>
        </ul>

        <div id="tagContent">
            <div class="tagContent selectTag" id="tagContent0">
                <fieldset>
                    <ul class="cateradio" style="list-style-position: inherit">
                        <li <eq name="info.shoptpltypeid" value="1">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_1.png" onclick="javascript:alert('已选择模板1')" >
                                <input class="radio" type="radio" name="optype" value="1" <eq name="info.shoptpltypeid" value="1">checked</eq> /> 模板1 
                            </label>
                        </li>
                        <li <eq name="info.tpltypeid" value="2">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_2.png" onclick="javascript:alert('已选择模板2')" >
                                <input class="radio" type="radio" name="optype" value="2" <eq name="info.shoptpltypeid" value="2">checked</eq> /> 模板2 
                            </label>
                        </li>
                        <li <eq name="info.shoptpltypeid" value="3">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_3.png" onclick="javascript:alert('已选择模板3')" >
                                <input class="radio" type="radio" name="optype" value="3" <eq name="info.shoptpltypeid" value="3">checked</eq> /> 模板3 
                            </label>
                        </li>
                          <li <eq name="info.shoptpltypeid" value="4">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_4.png" onclick="javascript:alert('已选择模板4')" >
                                <input class="radio" type="radio" name="optype" value="4" <eq name="info.shoptpltypeid" value="4">checked</eq> /> 模板4 
                            </label>
                        </li>
                         <li <eq name="info.shoptpltypeid" value="5">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_5.png" onclick="javascript:alert('已选择模板5')" >
                                <input class="radio" type="radio" name="optype" value="5" <eq name="info.shoptpltypeid" value="5">checked</eq> /> 模板5 
                            </label>
                        </li>
                         <li <eq name="info.shoptpltypeid" value="6">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_9.png" onclick="javascript:alert('已选择模板6')" >
                                <input class="radio" type="radio" name="optype" value="6" <eq name="info.shoptpltypeid" value="6">checked</eq> /> 模板6 
                            </label>
                        </li>
                        <li <eq name="info.shoptpltypeid" value="7">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_7.png" onclick="javascript:alert('已选择模板7')" >
                                <input class="radio" type="radio" name="optype" value="7" <eq name="info.shoptpltypeid" value="7">checked</eq> /> 模板7 
                            </label>
                        </li>
                         <li <eq name="info.shoptpltypeid" value="8">class="active"</eq> style="margin:10px 30px;" >
                            <label>
                                <img src="{weixin::RES}/images/index_8.png" onclick="javascript:alert('已选择模板8')" >
                                <input class="radio" type="radio" name="optype" value="8" <eq name="info.shoptpltypeid" value="8">checked</eq> /> 模板8 
                            </label>
                        </li>
                    </ul>
                </fieldset>
            </div>
            <div class="tagContent" id="tagContent1">
                <fieldset>
                    <ul class="cateradio2" style="list-style-position: inherit">
                        <li <eq name="info.shoptpllistid" value="1">class="active"</eq> >
                            <label><img src="{weixin::RES}/images/cats_1.png">
                                <input class="radio2" type="radio" name="optype2" value="1" <eq name="info.shoptpllistid" value="1">checked</eq> /> 模板1
                            </label>
                        </li>
                        <li <eq name="info.shoptpllistid" value="2">class="active"</eq> >
                            <label><img src="{weixin::RES}/images/cats_2.png">
                                <input class="radio2" type="radio" name="optype2" value="2" <eq name="info.shoptpllistid" value="2">checked</eq> /> 模板2
                            </label>
                        </li>
                        <li <eq name="info.shoptpllistid" value="3">class="active"</eq> >
                            <label><img src="{weixin::RES}/images/cats_3.png">
                                <input class="radio2" type="radio" name="optype2" value="3" <eq name="info.shoptpllistid" value="3">checked</eq> /> 模板3
                            </label>
                        </li>
                        <li <eq name="info.shoptpllistid" value="4">class="active"</eq> >
                            <label><img src="{weixin::RES}/images/cats_4.png">
                                <input class="radio2" type="radio" name="optype2" <eq name="Think.session.gid" value="2">disabled="disabled"</eq> value="4" <eq name="info.shoptpllistid" value="4">checked</eq> /> 模板4
                            </label>
                        </li>
                        <li <eq name="info.shoptpllistid" value="5">class="active"</eq> >
                            <label><img src="{weixin::RES}/images/cats_5.png">
                                <input class="radio2" type="radio" name="optype2" value="5" <eq name="info.shoptpllistid" value="5">checked</eq> /> 模板5
                            </label>
                        </li>
                        <li <eq name="info.shoptpllistid" value="6">class="active"</eq> >
                            <label><img src="{weixin::RES}/images/cats_6.png">
                                <input class="radio2" type="radio" name="optype2" value="6" <eq name="info.shoptpllistid" value="6">checked</eq> /> 模板6
                            </label>
                        </li>
                    </ul>
                </fieldset>
            </div>
            <div class="tagContent" id="tagContent2">
                <fieldset>
                    <ul class="cateradio3"  style="list-style-position: inherit">
                        <li <eq name="info.shoptpllist2id" value="1">class="active"</eq> ><label><img src="{weixin::RES}/images/product_1.png"><input class="radio3" type="radio" name="optype3" value="1" <eq name="info.shoptpllist2id" value="1">checked</eq>/>模板1 </label></li>
                        <li <eq name="info.shoptpllist2id" value="2">class="active"</eq> ><label><img src="{weixin::RES}/images/product_2.png"><input class="radio3" type="radio" name="optype3" value="2" <eq name="info.shoptpllist2id" value="2">checked</eq>/>模板2 </label></li>
                        <li <eq name="info.shoptpllist2id" value="3">class="active"</eq> ><label><img src="{weixin::RES}/images/product_3.png"><input class="radio3" type="radio" name="optype3" value="3" <eq name="info.shoptpllist2id" value="3">checked</eq>/>模板3</label></li>
                        <li <eq name="info.shoptpllist2id" value="4">class="active"</eq> ><label><img src="{weixin::RES}/images/product_4.png"><input class="radio3" type="radio" name="optype3" value="4" <eq name="info.shoptpllist2id" value="4">checked</eq>/>模板4</label></li>
                    </ul>
                </fieldset>
            </div>
            <div class="tagContent" id="tagContent3">
                <fieldset>
                    <div class="cateradio4">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tbody>
                                <tr>
                                    <td width="400" rowspan="2" valign="top">
                                        <div class="samsung-render">
                                            <iframe src="/index.php?g=Wap&m=Index&token={weixin:$info.token}&show=1" id="myiframe" width="320" height="406" frameborder="0" style="overflow-x:hidden;"></iframe>
                                        </div>
                                    </td>
                                    <td valign="top"><h3>请选择你喜欢的颜色风格，实时预览 (<span style="color:#c30">注意：只有在手机上才能获得最佳浏览效果，电脑浏览并不一定是最终显示效果，并且仅部分模板支持更换颜色风格</span>)</h3>
                                        <ul>
                                            <li><label><input class="radio4" type="radio" name="optype4" value="0" <eq name="info.color_id" value="0">checked="checked"</eq>> 默认风格</label></li>
                                            <li><label><input class="radio4" type="radio" name="optype4" value="1" <eq name="info.color_id" value="1">checked="checked"</eq>> 黑色风格</label></li>
                                            <li><label><input class="radio4" type="radio" name="optype4" value="2" <eq name="info.color_id" value="2">checked="checked"</eq>> 蓝色风格</label></li>
                                            <li><label><input class="radio4" type="radio" name="optype4" value="3" <eq name="info.color_id" value="3">checked="checked"</eq>> 木纹风格</label></li>
                                            <li><label><input class="radio4" type="radio" name="optype4" value="4" <eq name="info.color_id" value="4">checked="checked"</eq>> 橙色风格</label></li>
                                            <li><label><input class="radio4" type="radio" name="optype4" value="5" <eq name="info.color_id" value="5">checked="checked"</eq>> 紫色风格</label></li>
                                            <li><label><input class="radio4" type="radio" name="optype4" value="6" <eq name="info.color_id" value="6">checked="checked"</eq>> 绿色风格</label></li>
                                        </ul>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <div class="clr"></div>
                    </div>
                </fieldset>
            </div>
        </div>

        <script type="text/javascript">
            function selectTag(showContent,selfObj){
                // 操作标签
                var tag = document.getElementById("tags").getElementsByTagName("li");
                var taglength = tag.length;
                for(i=0; i<taglength; i++){
                    tag[i].className = "";
                }
                selfObj.parentNode.className = "selectTag";
                // 操作内容
                for(i=0; j=document.getElementById("tagContent"+i); i++){
                    j.style.display = "none";
                }
                document.getElementById(showContent).style.display = "block";


            }
        </script>


        <script>

            $(".radio").click(function(){
                $(".cateradio li").each(function(){
                    $(this).removeClass("active");
                });
                $(this).parents("li").addClass("active");
                var myurl='index.php?g=User&m=Shoptmpls&a=add&style='+$(this).val()+'&r='+Math.random(); 
                $.ajax({url:myurl,async:false});
                $("#myiframe").attr("src",$("#myiframe").attr("src")+'&r='+Math.random());


            });
            $(".radio2").click(function(){
                $(".cateradio2 li").each(function(){
                    $(this).removeClass("active");
                });
                $(this).parents("li").addClass("active");
  
                var myurl ='index.php?g=User&m=Shoptmpls&a=lists&style='+$(this).val()+'&r='+Math.random(); 
                $.ajax({url:myurl,async:false});


            });
            $(".radio3").click(function(){
                $(".cateradio3 li").each(function(){
                    $(this).removeClass("active");
                });
                $(this).parents("li").addClass("active");
  
                var myurl='index.php?g=User&m=Shoptmpls&a=content&style='+$(this).val()+'&r='+Math.random(); 
                $.ajax({url:myurl,async:false});

            });
            $(".radio4").click(function(){
                var myurl='index.php?g=User&m=Shoptmpls&a=background&style='+$(this).val()+'&r='+Math.random(); 
                $.ajax({url:myurl,async:false});
                $("#myiframe").attr("src",$("#myiframe").attr("src")+'&r='+Math.random());
            });
            function changeapp(obj,gid){
                if(obj.checked==true){ 
                    var myurl='index.php?ac=app&op=open&value=1&id=9379&wxid=gh_858dwjkeww5&openid='+gid+'&r='+Math.random(); 
                    $.ajax({url:myurl,async:false});

                }else{
 
                    var myurl='index.php?ac=app&op=open&value=0&id=9379&wxid=gh_858dwjkeww5&openid='+gid+'&r='+Math.random(); 
                    $.ajax({url:myurl,async:false});

                }
            }

        </script>


        <div class="clr"></div>
    </div>

</div>

<div class="clr"></div>
</div>
</div>
</div> 
<!--底部-->
</div><script>
    KindEditor.ready(function(K) {
        var editor = K.editor({
            allowFileManager : true
        });

        K('#image').click(function() {
            editor.loadPlugin('image', function() {
                editor.plugin.imageDialog({
                    showRemote : false,
                    imageUrl : K('#img').val(),
                    clickFn : function(url, title, width, height, border, align) {
                        K('#img').val(url);
                        var show_img = '<img src = "' + url + '" width="80" height="80" />';
                        $('#show_img').html(show_img);
                        editor.hideDialog();
                    }
                });
            });
        });
    });
</script>
<include file="Public:footer"/>